package com.example.mapper;

import cn.hutool.json.JSONObject;
import com.example.entity.*;
import com.example.entity.others.User_Question;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ParentMapper {
    List<Parent_Student> listStudent(int uid);

    void bind(Parent_Student parentStudent);

    User getStudentBySid(int sid);

    List<Test_User> getTestUserListById(User user);

    JSONObject getTestById(Test_User testUser);

    List<User_Question> getUqcByTestid(int tid, int uid);

    List<User_Question> getUqfByTestid(int tid, int uid);

    List<User_Question> getUqsByTestid(int tid, int uid);

    void createTest(Test test);

    void createTestUser(Test_User testUser);

    void createQuestion(Question question);

    void createQuestionParent(Question_Parent questionParent);

    void createQuestionStudent(Question_Student questionStudent);

    void createTestByHuman(Test test);

    List<Test> getTestBySubject(Test test);

    List<Question> getAllCByTid(Test test1);

    List<Question> getAllFByTid(Test test1);

    List<Question> getAllSByTid(Test test1);

    void updateTest(Test test);

    List<User_Question> getUqcByTestidParent(int tid, int uid);

    List<User_Question> getUqfByTestidParent(int tid, int uid);

    List<User_Question> getUqsByTestidParent(int tid, int uid);

    int getBindbyId(Parent_Student parentStudent);

    void deleteTestUser(Test_User testUser);

    List<Question> getAllByTid(Test test);

    void deleteQuestion(Question_Parent questionParent);

    void updateQPById(Question_Parent qs);

    List<User_Question> getParUqcByTestid(int tid, int pid);

    List<User_Question> getParUqfByTestid(int tid, int pid);

    List<User_Question> getParUqsByTestid(int tid, int pid);

    void updateQSById(Question_Parent questionParent);

    List<Integer> getQuestionId(int tid);

    void resetQuestion(int uid, Integer qid);

    Test_User getTestUserByTidUid(Test_User testUser);

    Test getTestByIdParent(Test_User testUser);

    List<JSONObject> getAnalysisBySid(User user);

    List<JSONObject> getTidBySid(@Param("sidList")List<Integer> sidList,String subject);

    List<JSONObject> getStudentAnalysis2(List<Integer> sidList, String subject);

    List<String> getKnPoint(List<Integer> sidList, String subject);

    List<Integer> getStudentAnalysis3(String kpoint, List<Integer> sidList, String subject);

    Object getStudentAnalysis31(Integer tid, List<Integer> sidList);

    List<JSONObject> getStudentAnalysis4(List<Integer> sidList, String subject);
}
